package com.yuw.oop.lianxi;

public class Teacher extends Person {
	// 属性
	private String courseName;
	// 行为

	public String getCourseName() {
		return courseName;
	}

	@Override
	public void printMe() {
		// 调用父类的被覆盖的方法，打印姓名、姓名、年龄信息
		super.printMe();
		// 打印教师新扩展的信息
		System.out.println("教授课程名：" + this.getCourseName());
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public Teacher(String perName, String perSex, int perAge, String courseName) {
		super(perName, perSex, perAge);
		this.courseName = courseName;
	}

	public Teacher() {
		super();
		// TODO Auto-generated constructor stub
	}

}
